{{define "Title"}}按员工查询{{end}}
{{define "Content"}}

<script type=text/javascript src="/js/calendar.js"></script>
<script type=text/javascript src="/js/tablestyle.js"></script>

<div class="container-fluid">
<form class="form-horizontal" action="/querybyoper" method="POST">
  <fieldset>
    <legend><b>按员工查询</b></legend>
    {{if .error}}<div class="alert alert-error"><b>错误: </b>{{.error | html}}</div>
    {{end}}
    <div class="control-group">
      <label class="control-label">开始时间&nbsp;</label>
      <div class="control">
        <input class="input-large" id="fromdate" name="fromdate" style="background-color: #FFFFD0" onfocus="setday(this);" size="20"> <b style="color: red">*</b>
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">结束时间&nbsp;</label>
      <div class="control">
        <input class="input-large" id="todate" name="todate" style="background-color: #FFFFD0" onfocus="setday(this);" size="20"> <b style="color: red">*</b>
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">作业员&nbsp;</label>
      <div class="control">
        <input type="text" class="input-large" id="oper" name="oper" style="background-color: #FFFFD0" maxlength="20"> <b style="color: red">*</b>
      </div>
    </div>
    <div class="form-actions">
      <button type="submit" class="btn btn-primary">查询</button>
    </div>
  </fieldset>
</form>
</div>

{{if .oper_lst}}
<div class="control-group">
  <label class="control-label">查询的日期范围: <b>{{.begindate | html}} - {{.enddate | html}}</b></label>
</div>
<div class="control-group">
  <label class="control-label">作业员: <b>{{.operator | html}}</b></label>
</div>

<div class="content-box">
  <div class="content-box-header">
    <p style="font-size: 16px;">&nbsp;&nbsp;<b>查询明细</b></p>
  </div>
<table id="tbl_ls" border="1" cellspacing="0" cellpadding="0" style="font-size:100%">
  <thead>
    <tr>
      <th>站点</th>
      <th>数量</th>
    </tr>
  </thead>  
  <tbody>
    {{$oper := .operator}}
    {{$begin := .begindate}}
    {{$end := .enddate}}
    {{range .oper_lst}}
    <tr>
    <td id="detail_sta" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px">{{.Station | html}}</td>
    <td id="detail_qty" fieldset style="color: #666666; border-style: groove; font-weight: bold"><a href="/operdetail?op={{$oper | html}}&st={{.Station | html}}&fd={{$begin | html}}&td={{$end | html}}">{{.Count | html}}</a></td>
    </tr>
    {{end}}
  </tbody>
</table>
</div>
{{end}}

{{end}}